			import java.lang.Math;
			
			public class math_calculations {
			
					private int x0,y0;
					math_calculations(int X, int Y){
						this.x0=X;
						this.y0=Y;
					}
					
					
					/***********************************************************************************
					 * all the existing help functions 
					 ***********************************************************************************/
					
					//this is the function that will calculate the delta between two x\y values
					public int delta(int z1,int z2){
						return z1-z2;
					}
					//this is the function that calculates the length of the vector
					public long vec_length(int x, int y){
						long res;
						res=(long) Math.sqrt(Math.pow((x0-x),2)+Math.pow((y0-y),2));
						return res;
					}
					//this is the function that returns the ratio between two distance vectors
					//which will help us in the zoom_in zoom_out_function 
					public long ratio(long d1, long d2){
						long S;
						S=(d2)/(d1);
						return S;
					}
					//this is the function that will help me calculate the angle between two vectors
					public long teta(long x1,long x2,long y1,long y2){
						long count=x1*x2+y1*y2;
						long a=(long) (Math.pow((x1-x0),2)+Math.pow((y1-y0),2));
						long b=(long) (Math.pow((x2-x0),2)+Math.pow((y2-y0),2));
						long base=(long) (Math.sqrt(a)*Math.sqrt(b));
						long answer = count/base;
						return (long) Math.acos(answer);
					}
					/***********************************************************************************
					 * all the click_on_mouse_final_functions
					 ***********************************************************************************/
					//this is the function that will return the translation of x\y
					public int translate_point(int k,int k1,int k2){
						int local_k=k;
						return local_k=local_k+delta(k1,k2);
					}
					//the functions that we use in order to zoom in \zoom out each value of x\y has is own function 
					public long zoom_x(long x,long s){
						long zoom=s*x +x*x0*(1-s);
						return zoom;
					}
					
					public long zoom_y(long y,long s){
						long zoom= s*y+y*y0*(1-s);
						return zoom;
					}
					
					public long x_rotate(long x, long y,long teta){
						long x_tag;
						x_tag=(long) (x*Math.cos(teta)-y*Math.sin(teta)+x0*(1-Math.cos(teta))+y0*Math.sin(teta));
						return x_tag;
					}
					
					public long y_rotate(long x, long y,long teta){
						long y_tag;
						y_tag=(long) (x*Math.sin(teta)+y*Math.cos(teta)+y0*(1-Math.cos(teta))-x0*Math.sin(teta));
						return y_tag;
					}
			}
					